package com.mzkj.wanjulaile.mobile.api.modules.shoppingCart.entity;

import com.mzkj.wanjulaile.mobile.api.common.entity.DataEntity;
import com.mzkj.wanjulaile.mobile.api.modules.account.entity.Account;
import com.mzkj.wanjulaile.mobile.api.modules.toy.entity.Toy;

import javax.validation.constraints.NotNull;

/**
 * 购物车Entity
 * @author ianly
 * @version 2016-10-17
 */
public class ShoppingCart extends DataEntity<ShoppingCart> {
	
	private static final long serialVersionUID = 1L;
	private Account account;		// 用户信息
	private Toy toy;		// 玩具信息
	private Integer toyCount;		// 玩具数量
	
	public ShoppingCart() {
		super();
	}

	public ShoppingCart(String id){
		super(id);
	}

	public Account getAccount() {
		return account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

	public Toy getToy() {
		return toy;
	}

	public void setToy(Toy toy) {
		this.toy = toy;
	}

	@NotNull(message="玩具数量不能为空")
	public Integer getToyCount() {
		return toyCount;
	}

	public void setToyCount(Integer toyCount) {
		this.toyCount = toyCount;
	}
	
}